#include<iostream>
#include"my_binary_tree.h"
using namespace std;

void construct_test(vector<int>& v){
	int height=3;
	int sum=pow(2,height)-1;
	for(int i=0;i<sum;i++){
		v.push_back(i);
	}	
}

void construct_test2(vector<int>& v){
	v.push_back(4);
	v.push_back(2);
	v.push_back(6);
	v.push_back(1);
	v.push_back(3);
	v.push_back(5);
	v.push_back(7);	
}

int main(){
	cout<<"test:construct_binary_tree"<<endl;
	my_binary_tree<int> bt1(0);
	vector<int> v;
	construct_test2(v);
	my_binary_tree<int>* p=bt1.construct_full_binary_tree(v,0);
	cout<<(*p); 
	cout<<"test:find_father"<<endl;
	my_binary_tree<int>* son=p->find(7);
	my_binary_tree<int>* father=p->find_father(son);
	father->get_value();
	cout<<"test:is_binary_balence_tree"<<endl;
	cout<<p->is_balence_binary_tree()<<endl;	
	bt1.append(p,"left");
	cout<<bt1.is_balence_binary_tree()<<endl;	
	
	return 0;
}
    
